package com.shopping.dao;

import com.shopping.bean.User;
import com.shopping.util.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserDao {

    User getUserByUsername(@Param("username") String username);

    User getUserByID(@Param("userid") Integer userid);
    int editUser(@Param("user") User user);
    int add(@Param("user") User user);
    int deleteUser(@Param("userid") Integer userid);
    List<User> getUserList(@Param("text") String text, @Param("page") Page page);
    int getUserCount(@Param("text") String text);
    int updatePassword(@Param("userId") Integer userId, @Param("newPassword") String newPassword);
}
